web3.js@0.2x.x web3.eth.accounts
web3.eth.accounts
ノードによって管理されているアカウントのリストを返します。
読み取り専用プロパティです。
非同期コード
web3.eth.getAccounts(callback(error, result){ ... })
戻り値
Array
クライアント(ノード)によって管理されているアドレスの配列です。
サンプルコード
code:example.js
var accounts = web3.eth.accounts;
console.log(accounts); // "0xF02c1c8e6114b1Dbe8937a39260b5b0a374432bB"
参考
https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethaccounts
#web3.js@0.2x.x #web3.js